package cn.stylefeng.guns.sys.modular.dbServicelist.service;

import cn.stylefeng.guns.base.auth.model.LoginUser;
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.dbServicelist.entity.DbServicelist;
import cn.stylefeng.guns.sys.modular.dbServicelist.entity.Exchange;
import cn.stylefeng.guns.sys.modular.dbServicelist.model.params.DbServicelistParam;
import cn.stylefeng.guns.sys.modular.dbServicelist.model.result.DbServicelistResult;
import cn.stylefeng.roses.kernel.model.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import io.swagger.models.auth.In;

import java.text.ParseException;
import java.util.List;

/**
 * <p>
 * 目录服务  服务类
 * </p>
 *
 * @author zhaoyiheng
 * @since 2020-08-19
 */
public interface DbServicelistService extends IService<DbServicelist> {

    /**
     * 新增
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    void add(DbServicelistParam param, LoginUser user);

    /**
     * 删除
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    void delete(DbServicelistParam param);

    /**
     * 更新
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    void update(DbServicelistParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    DbServicelistResult findBySpec(DbServicelistParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    List<DbServicelistResult> findListBySpec(DbServicelistParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    LayuiPageInfo findPageBySpec(DbServicelistParam param) throws ParseException;

    void upDataTime(DbServicelistParam param) throws ParseException;

    /**
     * 查询分页数据，过期列表
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    LayuiPageInfo findPageBySpecTime(DbServicelistParam dbServicelistParam) throws ParseException;

    /**
     * 下架申请
     *
     * @author zhaoyiheng
     * @Date 2020-08-19
     */
    void offShelf(DbServicelistParam dbServicelistParam) throws ParseException;

    void active(DbServicelistParam dbServicelistParam, LoginUser user) throws ParseException;

    /**
     * 查询服务目录分页数据，Specification模式
     *
     * @author author
     * @Date 2020-08-31
     */
    LayuiPageInfo findServicePageBySpec(DbServicelistParam param) throws ParseException;


    /**
     * 查询委办局已申请服务目录分页数据
     *
     * @author author
     * @Date 2020-09-10
     */
    LayuiPageInfo queryApply(DbServicelistParam param) throws ParseException;

    /**
     * 测试连接服务器和数据库
     */
    String testConnectServer(DbServicelistParam param);

    /**
     * 交换机服务器下拉框
     */
    List<Exchange> searchExchangeList(Exchange exchange);

    /**
     * 通过id查询某条serviceList
     */
    DbServicelistResult queryDbServiceListInfo(Integer id);

    /**
     *普通查询servicelist的方法
     */
    LayuiPageInfo queryServiceListByParam(DbServicelistParam param) throws ParseException;


}
